﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Globalization;

namespace Musicman.Common.Entities
{
    public class SearchFile 
    {
        private long? searchFileID;
        private string name;
        private DateTime changeTime;
        private long length;
        private string filePath;
        private long searchJobID;
        private int presentSequence;
        private bool visited;
        private FileStats statistics;

        public SearchFile()
        {

        }

        public SearchFile(FileInfo fi, long searchJobID)
        {
            this.searchJobID = searchJobID;
            this.presentSequence = -1;
            this.Visited = true;

            this.Name = fi.Name;
            this.FilePath = fi.Directory.FullName;
            this.changeTime = fi.LastWriteTime;
            this.Length = fi.Length;
            
        }

        public long? SearchFileID
        {
            get { return searchFileID; }
            set { searchFileID = value; }
        }

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public DateTime ChangeTime
        {
            get { return changeTime; }
            set { changeTime = value; }
        }

        public long Length
        {
            get { return length; }
            set { length = value; }
        }

        public string FilePath
        {
            get { return filePath; }
            set { filePath = value; }
        }

        public long SearchJobID
        {
            get { return searchJobID; }
            set { searchJobID = value; }
        }

        public int PresentSequence
        {
            get { return presentSequence; }
            set { presentSequence = value; }
        }

        public bool Visited
        {
            get { return visited; }
            set { visited = value; }
        }

        public FileStats Statistics
        {
            get { return statistics; }
            set { statistics = value; }
        }
    }
}
